<?php if (!defined('THINK_PATH')) exit(); /*a:6:{s:64:"D:\douzhi\PHP\ask\public/../application/home\view\user\user.html";i:1653613913;s:51:"D:\douzhi\PHP\ask\application\home\view\layout.html";i:1653012221;s:56:"D:\douzhi\PHP\ask\application\home\view\common\meta.html";i:1652757039;s:58:"D:\douzhi\PHP\ask\application\home\view\common\script.html";i:1716738735;s:58:"D:\douzhi\PHP\ask\application\home\view\common\header.html";i:1653118101;s:58:"D:\douzhi\PHP\ask\application\home\view\common\footer.html";i:1652754708;}*/ ?>
<!DOCTYPE html>
<html>
	<head>
		<!-- 引用样式 -->
		<meta charset="utf-8">
<title>ask论坛</title>
<link rel="stylesheet" href="/static/home/layui/css/layui.css">
<link rel="stylesheet" href="/static/home/css/global.css">
<link rel="stylesheet" href="/static/home/css/common.css">

		<!-- 引入js -->
		<script src="/static/home/layui/layui.js"></script>
<script type="text/javascript" src="/static/admin/js/jquery.min.js"></script>
<script>
layui.cache.page = '';
layui.cache.user = {
  username: '游客'
  ,uid: -1
  ,avatar: '/static/home/images/avatar/00.jpg'
  ,experience: 83
  ,sex: '男'
};
layui.config({
  version: "3.0.0"
  ,base: '/static/home/mods/' //这里实际使用时，建议改成绝对路径
}).extend({
  fly: 'index'
}).use('fly');
</script>
	</head>
	<body>
		<!-- 引用头部 -->
		<div class="fly-header layui-bg-black">
  <div class="layui-container">
    <a class="fly-logo" href="<?php echo url('home/index/index'); ?>">
      <img src="/static/home/images/logo.png" alt="layui">
    </a>
    
    <ul class="layui-nav fly-nav-user">
      
      <!-- 登入后的状态 -->
      <?php if(\think\Request::instance()->action() != 'login' && \think\Request::instance()->action() != 'register'): if(\think\Cookie::get('LoginUser')): ?>
			  <li class="layui-nav-item">
				<a class="fly-nav-avatar" href="javascript:;">
				  <cite class="layui-hide-xs"><?php echo $LoginUser['nickname']; ?></cite>
				  <?php if($LoginUser['auth'] == 1): ?>
				  <i class="iconfont icon-renzheng layui-hide-xs" title="认证信息：<?php echo $LoginUser['nickname']; ?>"></i>
				  <?php else: ?>
				  <span style="color: #c00;"> 未认证 </span>
				  <?php endif; ?>
				  <i class="layui-badge fly-badge-vip layui-hide-xs">VIP<?php echo $LoginUser['vip']; ?></i>
				  <img src="<?php echo $LoginUser['avatar_cdn']; ?>">
				</a>
				<dl class="layui-nav-child">
				  <dd><a href="<?php echo url('home/user/profile'); ?>"><i class="layui-icon">&#xe620;</i>基本设置</a></dd>
				  <dd><a href="user/message.html"><i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的消息</a></dd>
				  <dd><a href="user/home.html"><i class="layui-icon" style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a></dd>
				  <hr style="margin: 5px 0;">
				  <dd><a href="<?php echo url('home/index/loginout'); ?>" style="text-align: center;">退出</a></dd>
				</dl>
			  </li>
		 <?php else: ?>
			 <!-- 未登入的状态 -->
			 <li class="layui-nav-item">
			   <a class="iconfont icon-touxiang layui-hide-xs" href="user/login.html"></a>
			 </li>
			 <li class="layui-nav-item">
			   <a href="<?php echo url('home/index/login'); ?>">登入</a>
			 </li>
			 <li class="layui-nav-item">
			   <a href="<?php echo url('home/index/register'); ?>">注册</a>
			 </li>
			 <!-- <li class="layui-nav-item layui-hide-xs">
			   <a href="/app/qq/" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" title="QQ登入" class="iconfont icon-qq"></a>
			 </li>
			 <li class="layui-nav-item layui-hide-xs">
			   <a href="/app/weibo/" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})" title="微博登入" class="iconfont icon-weibo"></a>
			 </li> -->
		 <?php endif; endif; ?>
    </ul>
  </div>
</div>
		<!-- 引入内容部分 -->
		<div class="fly-home fly-panel" style="background-image: url(<?php echo $User['cover_cdn']; ?>);">
    <img src="<?php echo $User['avatar_cdn']; ?>" alt="<?php echo $User['nickname']; ?>">
    <?php if($User['auth'] == 1): ?>
        <i class="iconfont icon-renzheng" title="Fly社区认证"></i>
    <?php endif; ?>
    <h1>
        <?php echo $User['nickname']; if($User['sex'] == 1): ?>
        <i class="iconfont icon-nan"></i>
        <?php elseif($User['sex'] == 2): ?>
        <i class="iconfont icon-nv"></i> 
        <?php else: ?>
        <span><?php echo $User['sex_text']; ?></span>
        <?php endif; ?>
        <i class="layui-badge fly-badge-vip">VIP <?php echo $User['vip']; ?></i>
        <!--
      <span style="color:#c00;">（管理员）</span>
      <span style="color:#5FB878;">（社区之光）</span>
      <span>（该号已被封）</span>
      -->
    </h1>
    <?php if($User['auth']): ?>
        <p style="padding: 10px 0; color: #5FB878;">认证信息：<?php echo $User['nickname']; ?></p>
    <?php else: ?>
        <p style="color:#c00;"> 未认证 </p>
    <?php endif; ?>
    <p class="fly-home-info">
        <i class="iconfont icon-kiss" title="飞吻"></i><span style="color: #FF7200;"><?php echo $User['point']; ?> 积分</span>
        <i class="iconfont icon-shijian"></i><span><?php echo $User['createtime']; ?> 加入</span>
        <i class="iconfont icon-chengshi"></i>
			<span>
				<?php if($User['province']): ?>
				    <?php echo $User['regionText']; else: ?>
					保密
				<?php endif; ?>
			</span>
    </p>

    <p class="fly-home-sign">（<?php echo !empty($User['content'])?$User['content'] : '这个人太懒，什么都没留下'; ?>）</p>


</div>

<div class="layui-container">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md6 fly-home-jie">
            <div class="fly-panel">
                <h3 class="fly-panel-title"><?php echo $User['nickname']; ?> 最近的提问</h3>
                <ul class="jie-row">
					
                    <?php foreach($PostList as $item): ?>
                    <li>
						<?php if($item['state'] == 1): ?>
							<span class="fly-jing">置顶</span>
						<?php elseif($item['state'] == 2): ?>
							<span class="fly-jing">精华</span>
						<?php elseif($item['state'] == 3): ?>
							<span class="fly-jing">热门</span>
						<?php elseif($item['state'] == 0): ?>
							<span class="fly-jing">普通</span>
						<?php endif; ?>
							<span class="fly-jing"></span>
							<a href="<?php echo url('home/index/info',['postid'=>$item['id']]); ?>" class="jie-title"> <?php echo $item['title']; ?></a>
							<i><?php echo $item['createtime']; ?></i>
							<em class="layui-hide-xs">
							 <?php echo $item['visit_count']; ?>
							阅/<?php echo $item['comment_count']; ?>答</em>
                    </li>
                    <?php endforeach; ?>
                    
                    <!-- <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><i style="font-size:14px;">没有发表任何求解</i></div> -->
                </ul>
            </div>
        </div>

        <div class="layui-col-md6 fly-home-da">
            <div class="fly-panel">
                <h3 class="fly-panel-title"><?php echo $User['nickname']; ?> 最近的回答</h3>
                <ul class="home-jieda">
					<?php foreach($CommentList as $item): ?>
                    <li>
                        <p>
                            <span><?php echo $item['createtime']; ?></span>
                            在<a href="<?php echo url('home/index/info',['postid'=>$item['postid']]); ?>" target="_blank"><?php echo $item['post']['title']; ?></a>中回答：
                        </p>
                        <div class="home-dacontent">
                            <?php echo $item['content']; ?>
                        </div>
                    </li>
                    <?php endforeach; ?>

                    <!-- <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><span>没有回答任何问题</span></div> -->
                </ul>
				<!-- 分页 -->
				<?php echo $CommentList->render(); ?>
            </div>
        </div>
    </div>
</div>

		<!-- 引用尾部 -->
		<div class="fly-footer">
  <p>2017 &copy; <a href="http://www.layui.com/" target="_blank">Fly技术社区</a></p>
</div>
	</body>
</html>
